﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace PRE.Thongke_Baocao
{
    public partial class FrmThongkedanhsachnhanvien : DevExpress.XtraEditors.XtraForm
    {
        DAL.ThongkedanhsachnhanvienDAL _dal = new  DAL.ThongkedanhsachnhanvienDAL();
        public FrmThongkedanhsachnhanvien()
        {
            InitializeComponent();
        }

        private void FrmThongkedanhsachnhanvien_Load(object sender, EventArgs e)
        {
            //string id = (cboMATRANGTHAI.EditValue + "").Trim();

            DataTable _dtb = _dal.Thongkeddanhsachnhanvien();


            if (_dtb != null)
            {
                grcMain.DataSource = _dtb;
                label1.Text = "Tổng số nhân viên hiện tại  có : " + Convert.ToString(_dtb.Rows.Count) +  " nhân viên";
            }
        }

        private void btnindanhsach_Click(object sender, EventArgs e)
        {
            
            //string matrangthai =cboMATRANGTHAI.EditValue+ "";
            DataTable dtb_report = _dal.Thongkeddanhsachnhanvien();

            var frm = new Report.Report_Base();
            var xr = new Report.XRIndanhsachNV();

            xr.DataSource = dtb_report;
            frm.SetReport(xr);

            frm.Show();
        }

        private void btnthoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void dockPanel1_Click(object sender, EventArgs e)
        {

        }
        }
    }
